package com.zb.select.controller;

import com.zb.entity.SelectVo;
import com.zb.result.Result;
import com.zb.service.ZjFaultService;
import com.zb.service.ZjInstructionBookService;
import com.zb.service.ZjKnowledgeTypeService;
import com.zb.service.ZjVideoService;
import com.zb.utils.TokenUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @Author WEN
 * @Date 2023/8/14 0014
 **/
@Api(tags = "知识中心类下拉接口")
@RestController
@RequestMapping("/knowledge/select")
public class KnowledgeSelectController {
    @Resource
    private ZjKnowledgeTypeService knowledgeTypeService;

    @ApiOperation("知识库分类下拉数据列表")
    @PostMapping("/knowledgeTypepageSelect")
    public Result knowledgeTypepageSelect(HttpServletRequest request, @RequestBody SelectVo selectVo) {
        Long custAccId = TokenUtil.getcustAccIdByToken(request);
        return Result.success("获取知识库分类下拉数据成功").data(knowledgeTypeService.knowledgeTypepageSelect(custAccId, selectVo));
    }
}
